/*danh sach san pham hien thi admin*/
drop view dbo.v_adm_produtc_list
go
create view dbo.v_adm_produtc_list
AS 
SELECT  p.product_id, p.product_code, p.product_status, p.created_date, p.modify_date, p.modify_by, p.quantity, p.price, p.old_price, p.images, p.tax, p.sales, 
                      pit.product_item_id, pit.product_name, pit.product_alias, pit.product_desc_short, pit.product_desc, pit.product_features, pit.product_title, pit.product_meta_keyword, 
                      pit.product_meta_description, pit.product_item_enable,   pit.language_id
FROM dbo.tbl_product p
	INNER JOIN dbo.tbl_product_item pit ON pit.product_id = p.product_id 
	INNER JOIN dbo.tbl_product_ref_category prc ON p.product_id = prc.product_id 
	 INNER JOIN dbo.tbl_product_category pc ON  prc.category_id = pc.category_id
	--INNER JOIN dbo.tbl_product_category_item pci ON pci.category_id = pc.category_id 
 
GO

